<template>

  <div>

    <el-dialog
      title="查看信息"
      :visible.sync="dialogVisible"
      width="60%"
      >
      <el-descriptions title="申请信息">
        <el-descriptions-item label="姓名">{{stuName}}</el-descriptions-item>
        <el-descriptions-item label="培训类别">{{productName}}</el-descriptions-item>
        <el-descriptions-item label="入学班级">{{className}}</el-descriptions-item>
        <el-descriptions-item label="学费">{{feePayInf.tuition}} </el-descriptions-item>
        <el-descriptions-item label="付款方式">{{feePayInf.payType}}</el-descriptions-item>
        <el-descriptions-item label="付款周期">{{feePayInf.payPeriod}}</el-descriptions-item>
        <el-descriptions-item label="贷款机构">{{feePayInf.loanOrg}}</el-descriptions-item>
        <el-descriptions-item label="优惠金额">{{feePayInf.discountAmt}}</el-descriptions-item>
        <el-descriptions-item label="补贴金额">{{feePayInf.subsidyAmt}}</el-descriptions-item>
        <el-descriptions-item label="申请人">{{stuName}}</el-descriptions-item>
        <el-descriptions-item label="申请时间">{{feePayInf.applyTime}}</el-descriptions-item>
        <el-descriptions-item  label="备注">{{feePayInf.remark}}</el-descriptions-item>
      </el-descriptions>

      <el-descriptions title="审核信息">
        <el-descriptions-item label="审核结果">{{feeCheck.chckResult}}</el-descriptions-item>
        <el-descriptions-item label="审核人">{{feeCheck.operUserName}}</el-descriptions-item>
        <el-descriptions-item label="审核时间">{{feeCheck.createTime}}</el-descriptions-item>
        <el-descriptions-item label="备注">{{feeCheck.remark}}</el-descriptions-item>

      </el-descriptions>
      <el-descriptions title="缴费进度">
        <el-descriptions-item label="状态">{{status}}</el-descriptions-item>
        <el-descriptions-item label="缴费时间">{{feePayInf.payTime}}</el-descriptions-item>
      </el-descriptions>

      <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  </span>
    </el-dialog>

  </div>

</template>

<script>
export default {
  name: "paymentCK",
  data(){
    return{
      productName:"",
      className:"",
      dialogVisible:false,
      stuId:"",
      feePayInf:{},
      feeCheck:{},
      stuName:"",
      payTime:"",
      status:"",
      PAY_STATUS:[]
    }
  },
  methods:{
    openDialog(stuId,stuName,row){
      // console.log('productId',row)
      this.getPAY_STATUS()
      this.productName=row.$productId
      this.className=row.$classId
      this.stuId=stuId
      this.stuName=stuName
      this.dialogVisible =true
    },
    getPAY_STATUS(){
      this.$httpService.get('/yuanjiu.testnew/yj-config/getConfigByCode?itmCode=PAY_STATUS').then(res => {
        // console.log('字典',res)
        this.PAY_STATUS =res
       this.getList()
      })
    },
    getList(){
      this.$httpService.get('/yuanjiu.testnew/tn-fee-pay-inf/getFeePayInfByStuId?stuId='+this.stuId).then(res => {
        // console.log('wwwwww',res)
        if(res.feePayInf){
          this.feePayInf=res.feePayInf
        }
        if(res.feeCheck){
          this.feeCheck = res.feeCheck
        }
        this.payTime =res.payTime
         this.PAY_STATUS.forEach((x)=>{
          if(x.itmVal == res.status){
            this.status =x.itmName
          }
        })

        // this.dialogVisible = false
      })

    }
  }
}
</script>

<style scoped>

</style>
